package me.healthcare.mocktest;

import me.healthcare.common.BirthDayGenerator;
import me.healthcare.common.NameGenerator;
import me.healthcare.common.NumberGenerator;
import me.healthcare.model.Message;

public class Message_Mock {
	public static Message[] getMessageData(int numberOfMessages) {
		NameGenerator generator = new NameGenerator();

		Message[] message_data = new Message[numberOfMessages];

		for (int i = 0; i < message_data.length; i++) {
			message_data[i] = new Message(generator.getName(),
					"This is sample message number " + i, randomTime());
		}

		return message_data;
	}

	private static String randomTime() {
		int hour = NumberGenerator.getIntNumber(0, 12);
		int minute = NumberGenerator.getIntNumber(0, 60);
		return hour + ":" + minute;
	}

	public static Message[] getPatientData(int numberOfPatients) {
		NameGenerator generator = new NameGenerator();

		Message[] message_data = new Message[numberOfPatients];

		for (int i = 0; i < message_data.length; i++) {
			message_data[i] = new Message(generator.getName(),
					"Lần khám bệnh gần nhất ", BirthDayGenerator.getBirthDay());
		}

		return message_data;
	}
}
